package com.taobao.txc.resourcemanager.a.b;

import com.taobao.txc.parser.b.a.g;
import com.taobao.txc.parser.struct.TxcRuntimeContext;
import com.taobao.txc.parser.struct.TxcTable;
import com.taobao.txc.resourcemanager.a.e;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

public class d<T>
  extends a<T>
{
  public d(com.taobao.txc.resourcemanager.b.a.a parama, com.taobao.txc.resourcemanager.b.a.d paramd, com.taobao.txc.resourcemanager.b.b.a.a<T> parama1, g paramg)
  {
    super(parama, paramd, parama1, paramg);
  }
  
  public T b(Object... paramVarArgs)
  {
    g localg = c();
    com.taobao.txc.resourcemanager.b.a.a locala = a();
    com.taobao.txc.resourcemanager.b.a.d locald = b();
    com.taobao.txc.resourcemanager.b.b.a.a locala1 = d();
    Object localObject = locala1.b(0);
    Statement localStatement = locald.f();
    TxcRuntimeContext localTxcRuntimeContext = locala.c();
    localg.c().a();
    localg.d().a();
    String str1 = localg.g() + localg.d(locald) + " FOR UPDATE";
    localg.a(localg.a(locald, str1));
    localObject = locala1.b(localStatement, paramVarArgs);
    localg.b(localg.b(locald, str1));
    String str2 = locala.a(localg.d());
    localTxcRuntimeContext.c(str2);
    localTxcRuntimeContext.a(localg);
    return localObject;
  }
  
  public T c(Object... paramVarArgs)
  {
    g localg = c();
    com.taobao.txc.resourcemanager.b.a.a locala = a();
    com.taobao.txc.resourcemanager.b.a.d locald = b();
    com.taobao.txc.resourcemanager.b.b.a.a locala1 = d();
    Object localObject1 = locala1.b(0);
    e locale = new e();
    Connection localConnection = locala.b();
    Statement localStatement = locald.f();
    try
    {
      for (;;)
      {
        try
        {
          locala.setAutoCommit(false);
          localg.c().a();
          localg.d().a();
          String str1 = localg.g() + localg.d(locald) + " FOR UPDATE";
          localg.a(localg.a(locald, str1));
          localObject1 = locala1.b(localStatement, paramVarArgs);
          localg.b(localg.b(locald, str1));
          String str2 = locala.a(localg.d());
          locala.b(str2);
        }
        catch (com.taobao.txc.common.b.d locald1)
        {
          localConnection.rollback();
          locale.a(locald1);
        }
      }
      TxcRuntimeContext localTxcRuntimeContext = locala.c();
      localTxcRuntimeContext.a(localg);
      locala.commit();
    }
    catch (Throwable localThrowable)
    {
      locala.rollback();
      throw new SQLException(localThrowable);
    }
    finally
    {
      locala.setAutoCommit(true);
    }
    return localObject1;
  }
}


/* Location:           C:\Users\ibm\Downloads\txc-yun-sample (1)\txc-yun-sample\lib\txc-client-2.0.72.jar
 * Qualified Name:     com.taobao.txc.resourcemanager.a.b.d
 * JD-Core Version:    0.7.0.1
 */